import { Injectable, OnDestroy, Directive } from '@angular/core'
import { Subject } from 'rxjs'

@Directive()
@Injectable()
export abstract class AdDestroyComponent implements OnDestroy {
  destroy$: Subject<void> = new Subject()

  ngOnDestroy(): void {
    this.destroy$.next()
    this.destroy$.complete()
  }
}
